package com.synergy.stockflow.production.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.synergy.stockflow.product.entity.Bom;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "production_plan_detail")
public class ProductionPlanDetail {
    /**
     * 明细ID
     */
    @TableId(value = "detail_id", type = IdType.ASSIGN_ID)
    @Schema(description="明细ID")
    private String detailId;

    /**
     * 计划ID
     */
    @TableField(value = "plan_id")
    @Schema(description="计划ID")
    private String planId;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    @Schema(description="产品ID")
    private String productId;

    /**
     * BOM_ID
     */
    @TableField(value = "bom_id")
    @Schema(description="BOM_ID")
    private String bomId;

    /**
     * 工艺路线ID
     */
    @TableField(value = "routing_id")
    @Schema(description="工艺路线ID")
    private String routingId;

    /**
     * 计划生产数量
     */
    @TableField(value = "plan_quantity")
    @Schema(description="计划生产数量")
    private BigDecimal planQuantity;

    /**
     * 实际生产数量
     */
    @TableField(value = "actual_quantity")
    @Schema(description="实际生产数量")
    private BigDecimal actualQuantity;

    /**
     * 已生产数量
     */
    @TableField(value = "completed_quantity")
    @Schema(description="已生产数量")
    private BigDecimal completedQuantity;

    /**
     * 状态(0=未开始,1=生产中,2=已完成)
     */
    @TableField(value = "`status`")
    @Schema(description="状态(0=未开始,1=生产中,2=已完成)")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @Schema(description="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @Schema(description="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    @TableField(exist = false)
    @Schema(description="Bom")
    private List<Bom> boss;
}